From: Matt Watson Date: Thu, 23 Jan 2014 03:10:21 +0000 (-0800) Subject: Dispose cairo contexts in osdWindow and screenShield X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2870 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7c8c8111344bc0706a90525b36e3e88d479db833;p=gnome-shell.git Dispose cairo contexts in osdWindow and screenShield Need to manually dispose of cairo contexts used in gjs with $dispose(), or the context object will leak. These classes used cairo for drawing but were missing the dispose call. https://bugzilla.gnome.org/show_bug.cgi?id=722812 --- diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js index 773960c9e..199899fe0 100644 --- a/js/ui/osdWindow.js +++ b/js/ui/osdWindow.js @@ -66,6 +66,7 @@ const LevelBar = new Lang.Class({ cr.arc(radius, h - radius, radius, 0.5 * Math.PI, Math.PI); cr.arc(radius, radius, radius, Math.PI, 1.5 * Math.PI); cr.fill(); + cr.$dispose(); } }); diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 93dc81269..c0e58b379 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -413,6 +413,7 @@ const Arrow = new Lang.Class({ cr.lineTo(w/2, thickness); cr.lineTo(w - thickness / 2, h - thickness / 2); cr.stroke(); + cr.$dispose(); }, vfunc_style_changed: function() {